package com.exam.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.exam.demo.entity.Paper;
import com.exam.demo.entity.Question;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;


/**
 * 功能描述
 *
 * @author yxj30
 * @date 2022/03/16  19:23
 */
public interface QuestionService extends IService<Question> {

    //导出
    HttpServletResponse export(HttpServletResponse response) throws IOException;

    //导入
    boolean imp(MultipartFile file) throws IOException;

    Page<Question> findPage(Page<Question> questionPage, String questionTitle,Integer questionType,String courseId,String teacherId);

    List<Question> listByCourseIdAndQuestionType(String courseId, int i, Integer questionCount,Integer difficult);


    ArrayList<Question> random(Paper paper);
}
